<?php session_start();

$memberId = $_SESSION['memberId'];

$beer = $_GET['id'];
$rating = $_GET['rating'];

?><!doctype html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

<!--VIEWPORT META-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>

<title>Beer Ticks Mobile App Honor Code</title>

<!-- CSS stylesheets -->
    <link type="text/css" href="css/master.css" rel="stylesheet"/>
<!--WEBFONTS-->
	<link href='http://fonts.googleapis.com/css?family=Lobster' rel='stylesheet' type='text/css'/>    
	<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,600,700,300' rel='stylesheet' type='text/css'/>
<!--JAVASCRIPT-->
	<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
	<script type="text/javascript" src="js/scripts.js"></script>
	<script type="text/javascript" src="js/jquery.raty.js"></script>
	<script type="text/javascript" src="js/rating.js"></script>
<script type="text/javascript">
	$(document).ready(function() {
		//Send the rating and beer from the URL to the database for the user
		$('#honorTickBtn').click(function() {
			$.post("tick.php",{ id: '<?php echo $beer ?>', rating: '<?php echo $rating ?>', member:'<?php echo $memberId ?>' }, function(data) {
				window.location = 'masterlist.php';  
			});
		});
	});
</script>
    
</head>

<body>
	<!--SITE WRAPPER-->
	<div id="siteWrapper">
		<!--HONOR WRAPPER-->
		<div id="honorWrapper">
			<!--LOGO-->
			<div id="honorLogo"></div><!--/LOGO-->
			<!--HONOR HEADER-->
			<div id="honorHeader"><h2>Honor Code</h2>
			<div id="honorLine">&nbsp;</div></div>

			<!--HONOR COPY-->
			<div id="honorCopy"><p>By clicking below and ticking this beer, I hereby certify and promise that I have consumed at least 8 ounces. I accept the supposed consequences of an undeserved tick may result in bad beer karma that includes but is not limited to: missed high fives, indecent spillage, accidental inebriation, and long bar service times.</p></div><!--/HONOR COPY-->

			<!--HONOR CODE-->
			<div id="honorCode"><p>As it is <span id="largeText">written</span><br /> so <span id="mediumText">shall it be.</span></p></div><!--/HONOR CODE-->

			<!--BTN TICK-->
			<div id="honorTickBtn"><a href='#'><img src="images/btn_tick.png" alt="beerTicks" /></a></div><!--/BTN TICK-->
		</div>
		</div><!--/HONOR WRAPPER-->
		</div>
	</div><!--/SITE WRAPPER-->
</body>
</html>
